<?php
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept");
include "../../../config.php";



//只保留文字

$_data['ai_authur']="automa";
$_data['ai_url']=str_replace("?__tn__=%3C","",$_REQUEST['url']);
$_data['ai_url']=str_replace("&amp;__tn__=%3C","",$_REQUEST['url']);
$_data['ai_url']=str_replace("?__tn__=<","",$_REQUEST['url']);





//查看有没有这条数据，没有就插入，有就忽略
$_url=select_one_line_all_items($table_prefix."facebook_page_url",'url = "'.$_data['ai_url'].'"');

if($_url['nid']>0)
{
    //echo "exist"."：".$_url['nid']."/";

    $data="exist"."：".$_url['nid'];
    $arr['status'] = 200;
    $arr['info'] = $data;
    die(json_encode($arr));

}

else
{
    //执行语句
    $_sql=insert_data($table_prefix."facebook_page_url",$_data);
//执行语句
    mysql_query($_sql) or die("Error: " . mysql_error().$_sql);

    $data="done";
    $arr['status'] = 200;
    $arr['info'] = $data;
    die(json_encode($arr));

}






?>


